package com.zheng.russiaRec.controller 
{
	import com.zheng.russiaRec.staticData.EventData;
	import com.zheng.utils.DebugTrace;
	
	import org.puremvc.as3.interfaces.INotification;
	
	/**
	 * 检测是否有可消除的行
	 * @author rrDog
	 */
	public class C_CheckFiexd extends C_BaseCommand
	{	
		override public function execute(notification:INotification):void 
		{
			if(p_cb.isToBottom){
				p_cb.isToBottom = false;
				var hasLineFull:Array = p_cb.hasLineFull();
				if(hasLineFull!=null){
					delLine(hasLineFull);
				}else{
					createLiveGroup();
				}
				
			}
		}
		private function delLine(hasLineFull:Array):void{
			DebugTrace.monsterDebug(this, "消除行");
			sendNotification(EventData.C_DEL_LINE,hasLineFull);
		}
		private function createLiveGroup():void{
			sendNotification(EventData.P_BRICK_CREATED);
		}
	}

}